Support infix rules - #134
Conversation
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.
| Benchmark suite | Current: 6c2d06c | Previous: d803417 | Ratio |
|---|---|---|---|
BenchmarkWorkspaceCycle (typefox.dev/fastbelt/examples/statemachine) - MB/s |
22 MB/s |
5.21 MB/s |
4.22 |
BenchmarkParser (typefox.dev/fastbelt/examples/statemachine) - MB/s |
90.81 MB/s |
37.68 MB/s |
2.41 |
BenchmarkLexer (typefox.dev/fastbelt/examples/statemachine) - MB/s |
119.62 MB/s |
64.67 MB/s |
1.85 |
BenchmarkLexerAndParser (typefox.dev/fastbelt/examples/statemachine) - MB/s |
50.43 MB/s |
23.82 MB/s |
2.12 |
BenchmarkLocalLinking (typefox.dev/fastbelt/examples/statemachine) - MB/s |
25.57 MB/s |
16.69 MB/s |
1.53 |
This comment was automatically generated by workflow using github-action-benchmark.
ssmifi
left a comment
There was a problem hiding this comment.
Looks well-designed and -tested. There are one design and some minor questions left.
fe3f042 to
b6735dc
Compare
6c2d06c to
efe4301
Compare
sailingKieler
left a comment
There was a problem hiding this comment.
Thanks @msujew for this additional feature.
I've just minor remarks, mainly doc and a few nitpicks, see below.
Otherwise it's good to go.
For curiosity: Does the infix operator have measurable performance benefits?
ssmifi
left a comment
There was a problem hiding this comment.
From me as well. Thanks for the answers and the algo. :)
Minor only. Before #142, it was more. Now it's a 10% performance improvement for the arithmetics parser benchmark. |
Closes #115 (as a side effect).
Adds infix rule support, similar to how Langium did it (but a bit simpler, since we don't need CST support).
Implements the support by rewriting infix rules into parser rules of the shape
Expr (op Expr)*.